"""
@name : 什么是面向对象
@author : wenyao
@projectname: sanchuanglianxi
"""
#一个人上网
import requests
def userinfo(name, age, sex):
    return {"username":name, "userage":age, "usersex":sex}

# def web(user):
#     if user['userage'] > 16:
#         return requests.get("https://www.baidu.com").text
#     else:
#         return "不被允许"
# user1 = userinfo("wenyao",18,"f")
# print(web(user1))
# user2 = userinfo("wenyao",16,"m")
# print(web(user2))

# class People(object):
#     age = 18
#     def __init__(self, user):
#         self.user = user
#
#     def show(self):
#         print("i am {}".format(self.user))
#
#     def eat(self):
#         print("%s is eating..."%self.user)
#
# #实例化对象
# user1 = People("wenyao")
# user1.show()
#
# user2 = People("谷帅")
# user2.show()
#
# # show()
# # eat()
# ############################
# print("xxxx")
# print("yyyy")
# ########################
# def func1():
#     print("xxxxx")
# #===============
# #类里面是把属性和方法一起封装
#类的特征：封装、继承、多态